<?php
header("Content-type: text/json; charset=utf-8");
require("Frame.php");

$method = $_GET['method'];

if($method == "login")
{
    $user = $_GET['user'];
    $pass = $_GET['pass'];
    
    if($user != "admin"){
        $json->code = 400;
        $json->msg = "username not";
    }else if($pass != "admin"){
        $json->code = 400;
        $json->msg = "password error";
    }else{
        $json->code = 0;
        $json->msg = "success";
        $json->ip = $cnNl->getIP();
    }
    $cnJson->custom($json);
}




?>